package com.hqyj.am.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hqyj.am.pojo.Vacation;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;


/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author rock
<<<<<<< HEAD
 * @since 2022-08-19    @Param("vacation") Vacation vacation,
 */
//,@Param("userName")String userName,@Param("departmentName")String departmentName
@Component
public interface VacationMapper extends BaseMapper<Vacation> {
    //多表分页查询  姓名-部门-出差/请假方式查询
    Page<Vacation> pageVacationAll(@Param("page") Page<Vacation> page,@Param("userName")String userName,@Param("departmentName")String departmentName,@Param("vacationWay")String vacationWay,@Param("vacationState")String vacationState);

    //根据姓名查询---多表连查
    List<Vacation> queryByUserId(String userId);

    //根据员工姓名-shuan表查询
    Vacation selectByUserName(String userName);

    //根据请假-出差id单表查询
    Vacation selectByVacationId(Integer vacationId);

    //领导根据员工请假-出差,(未审核/已审核)查询
    List<Vacation> selectByState(String state);

    List<Vacation> scheduleThing(String state);

}
